package com.qf.cm.controller;

import com.qf.cm.pojo.Taskplan;
import com.qf.cm.service.TaskplanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Description: 公用常量
 * @Data: 2022/9/8 8:36
 * @Pacakge: com.qf.cm.controller
 * @ClassName: TaskplanController
 * @Author: fan
 */
@Controller
@RequestMapping("taskplan")
public class TaskplanController {
    @Autowired
    private TaskplanService taskplanService;
    @RequestMapping("findTaskplansByTname")
    public ModelAndView findTaskplansByTname(String tname){
        ModelAndView modelAndView = new ModelAndView();
        Taskplan taskplan = taskplanService.findTaskplansByTname(tname);
        modelAndView.setViewName("/pages/taskplan/taskplan");
        modelAndView.addObject("taskplan",taskplan);
        return modelAndView;
    }
}
